package com.shinewind.pojo.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CartGoodDto {
    @ApiModelProperty(value = "商品名称",required = true)
    @NotNull(message = "商品名称不能为null")
    private String name;
    @ApiModelProperty(value = "商品信息",required = true)
    @NotNull(message = "商品信息不能为null")
    private String info;
    @ApiModelProperty(value = "商品价格",required = true)
    @NotNull(message = "商品价格不能为null")
    @JsonProperty(value = "sPrice")
    private Double sPrice;
    @ApiModelProperty(value = "商品数量",required = true,notes = "默认为1")
    private Integer amount;
    @ApiModelProperty(value = "商品图片",required = true)
    @NotNull(message = "商品图片不能为null")
    private String src;
    @ApiModelProperty(value = "购物车所属的用户",required = true,notes = "默认为当前登录的用户")
    @NotNull(message = "用户id不能为null")
    @JsonProperty(value = "uId")
    private String uId;
    @ApiModelProperty(value = "模型的id",required = true)
    @NotNull(message = "模型id不能为null")
    @JsonProperty(value = "mId")
    private String mId;
}
